The present disclosure generally relates to the conversion of electrical energy, and more specifically aims at the conversion of electrical energy in ambient energy harvesting generators or power supplies. The present disclosure also aims at a circuit for comparing a voltage with a threshold.